if(!window.js2se)window.js2se=window.java={};

java.lang={};

java.lang.Object=(function(){
	var op=Object.prototype;
	if(!op.clone)op.clone=function(d){var p,o=new this.constructor();for(p in this){if(d&&typeof(this[p])=='object')o[p]=this[p].clone(d);else o[p]=this[p]}return o};
	if(!op.equals)op.equals=function(o){return(this==o||this.hashCode()==o.hashCode())};
	if(!op.getClass)op.getClass=function(){return(typeof this=="function")?this:this.constructor};
	if(!op.hashCode)op.hashCode=function(){if(!this.__hashCode)this.__hashCode=new Date().getTime();return this.__hashCode};
	op.instanceOf=function(c){return this.constructor==c};
})();

java.lang.Class=(function(){
	var op,fp=Function.prototype;op=Object.prototype;
	fp.forName = function(n){return(window[n])?window[n]:null};
	fp.getConstructor=function(){return(typeof this=="function")?this:this.constructor};
	fp.newInstance=function(){return new (this.getConstructor())};
	op.isArray = function(){return this.instanceOf(Array)};
	op.isInstance=function(o){var c=this.constructor;return(c==o||c==o.constructor)};
	op.extend=function(s){if(typeof s=="string")s=window[s];else if(s&&typeof s!="function"&&s.getClass)s=s.getClass();if(s)s.apply(this,this.constructor.arguments)};
})();

java.lang.Number=(function(){
	var np=Number.prototype;
	np.compareTo=function(n){return(this.valueOf()<n.valueOf()?-1:(this.valueOf()==n.valueOf()?0:1))};
	np.compare=function(n1,n2){return n1.compareTo(n2)};
	np.equals=function(n){return(this.valueOf()==n.valueOf())};
	np.doubleValue=function(){return new Double(this.valueOf())};
	np.floatValue=function(){return new Float(this.valueOf())};
	np.intValue=function(){return new Integer(this.valueOf())};
	np.longValue=function(){return new Long( this.valueOf())};
})();

java.lang.Boolean=(function(){
	var u,bp=Boolean.prototype;
	Boolean.FALSE=false;
	Boolean.TRUE=true;
	Boolean.TYPE=Boolean;
	if(typeof bp.booleanValue=="undefined")bp.booleanValue=function(){return this};
	bp.hashCode=function(){return(this==true)?1231:1237};
	bp.equals=function(o){return this==o||(o.booleanValue&&this.booleanValue()==o.booleanValue())};
	return Boolean
})();

java.lang.String=(function(){
	var sp=String.prototype;
	sp.equals=function(s){return(this==String(s))};
	sp.startsWith=function(s){return(this.indexOf(s)==0)};
	sp.endsWith=function(s){return(this.lastIndexOf(s)==this.length-s.length)};
	sp.replaceFirst=function(p,r){RegExp.multiline=false;return this.replace(new RegExp(p,"i"),r)};
	sp.replaceAll=function(p,r){RegExp.multiline=true;return this.replace(new RegExp(p,"gi"),r)};
	sp.trim=function(){return this.replace(/(^\s+)|(\s+$)/g,"")};
	sp.contentEquals=function(s){return this.toString()==s.toString()};
	return String
})();

java.lang.StringBuffer=function(s){
	var b=[];
	this.append=function(s){b.push(s);return this};
	this.charAt=function(i){try{return this.toString().charAt(i)}catch(e){throw new IndexOutOfBoundsException("StringBuffer.charAt(): index is negative or greater than or equal to length().")}};
	this.length=function(){return b.toString().length};
	this.toString=function(){return b.join("")};
	this.substring=function(s,e){try{return this.toString().substring(s,e)}catch(x){throw new StringIndexOutOfBoundsException("StringBuffer.substring(): start or end are negative or greater than length(), or start is greater than end.")}};
	if(s)this.append(s);
};

java.lang.Double=function(value){
	this.extend(Number);
	this.MAX_VALUE=Double.MAX_VALUE;
	this.MIN_VALUE=Double.MIN_VALUE;
	this.toString=function(){var s=String(v);if(s.indexOf(".")==-1)s+=".0";return s};
	this.hashCode=function(){var v=this.doubleValue();return(v^(v>>>32))};
	this.doubleValue=function(){return v};
	this.valueOf=function(){return parseFloat(v)};
	var v=(!isNaN(value))?value:0.0;
};
java.lang.Double.MAX_VALUE=1.7976931348623157E308;
java.lang.Double.MIN_VALUE=4.9E-324;

java.lang.Float=function(value){
	this.extend(Number);
	this.MAX_VALUE=Float.MAX_VALUE;
	this.MIN_VALUE=Float.MIN_VALUE;
	this.toString=function(){var s=String(v);if(s.indexOf(".")==-1)s+=".0";return s};
	this.valueOf=function(){return parseFloat(v)};
	var v=parseFloat((!isNaN(value))?value:0.0);
};
java.lang.Float.MAX_VALUE=3.4028235E38;
java.lang.Float.MIN_VALUE=1.4E-45;

java.lang.Integer=function(value) {
	this.extend(Number);
	this.MAX_VALUE=Integer.MAX_VALUE;
	this.MIN_VALUE=Integer.MIN_VALUE;
	this.toString=function(){return String(parseInt(v))};
	this.valueOf=function(){return parseInt(v)};
	var v=parseInt((!isNaN(value))?value:0);
};
java.lang.Integer.MAX_VALUE=2147483647;
java.lang.Integer.MIN_VALUE=-2147483648;

java.lang.Long=function(value) {
	this.extend(Number);
	this.MAX_VALUE=Long.MAX_VALUE;
	this.MIN_VALUE=Long.MIN_VALUE;
	this.toString=function(){return String(parseInt(v))};
	this.valueOf=function(){return parseInt(v)};
	var v=parseInt((!isNaN(value))?value:0);
};
java.lang.Long.MAX_VALUE=9223372036854775807;
java.lang.Long.MIN_VALUE=-9223372036854775808;

java.lang.Throwable=function(message,cause,type){
	var c,t,u,l,m=(message)?((message.message)?message.message:message):"";
	c=(cause)?cause:null;t=(type)?type:"java.lang.Throwable";u=document.location;l=0;
	this.getCause=function(){return c};
	this.getLocalizedMessage=function(){return this.getMessage()};
	this.getMessage=function(){return t+'\nException '+m+'\nin '+u+' on line '+l};
	this.toString=function(){return this.getMessage()}
	Error.apply(this, [this.getMessage()])
};

java.lang.Exception=function(message,cause,type){return new Throwable(message,cause,type||"java.lang.Exception")};
java.lang.RuntimeException=function(message,cause,type){return new Exception(message,cause,type||"java.lang.RuntimeException")};
java.lang.IndexOutOfBoundsException=function(message,cause,type){return new RuntimeException(message,cause,type||"java.lang.IndexOutOfBoundsException")};
java.lang.StringIndexOutOfBoundsException=function(message,cause,type){return new IndexOutOfBoundsException(message,cause,type||"java.lang.StringIndexOutOfBoundsException")};
java.lang.ClassNotFoundException=function(message,cause,type){return new Exception(message,cause,type||"java.lang.ClassNotFoundException")};
java.lang.IllegalArgumentException=function(message,cause,type){return new RuntimeException(message,cause,type||"java.lang.IllegalArgumentException")};
java.lang.NullPointerException=function(message,cause,type){return new RuntimeException(message,cause,type||"java.lang.NullPointerException")};
java.lang.ClassCastException=function(message,cause,type){return new RuntimeException(message,cause,type||"java.lang.ClassCastException")};

java.lang.System=new(function(){
	this.currentTimeMillis=function(){return new Date().getTime()};
	this.exit=function(){top.close()};
	this.getProperties=function(){
		if(!p&&java.util&&java.util.Properties){
			p=new java.util.Properties();
			try{p.load(path+"system.properties")}catch(ex){}
			
			var n,d,s,v,o,l=p.getProperty("user.language");
			d=document;n=navigator;
			if(!l||l=="auto")p.setProperty("user.language",(n.systemLanguage||n.userLanguage||n.language||n.browserLanguage||"en").substr(0,2).toLowerCase());
			p.setProperty("file.encoding",(d.charset||d.characterSet||d.defaultCharset||"unknown").toLowerCase());
			if(!p.getProperty("os.name")){
				o=getOs();
				p.setProperty("os.name",o.name);
				p.setProperty("os.version",o.version);
				p.setProperty("os.vendor",o.vendor);
				p.setProperty("os.arch",o.arch)
			}
			if(!p.getProperty("browser")){
				o=getBrowser();
				p.setProperty("browser",o.name);
				p.setProperty("browser.version",o.version);
				p.setProperty("browser.vendor",o.vendor)
			}
			if(!p.getProperty("java.class.path"))p.setProperty("java.class.path",path);
			v=p.getProperty("os.vendor");
			s=".separator";
			p.setProperty("file"+s,(v=="Microsoft")?"\\":"/");
			p.setProperty("line"+s,(v=="Microsoft")?"\r\n":"\n");
			p.setProperty("path"+s,(v=="Microsoft")?";":":");
			
			var tz=(-(new Date().getTimezoneOffset())/60);
			if(tz>0)tz="+"+tz;else if(tz==0)tz="";
			p.setProperty("user.timezone","GMT"+tz);
		}
		return p
	};
	this.setProperties=function(props){p=props};
	this.getProperty=function(k,d){var p,e="System.getProperty(): key is ";if(k==null)throw new NullPointerException(e+"null");else if(k=="")throw new IllegalArgumentException(e+"empty");p=this.getProperties();return(p&&p.getProperty)?p.getProperty(k,d):null};
	this.setProperty=function(k,v){var s,e="System.setProperty(): key is ";if(k==null)throw new NullPointerException(e+"null");else if(k=="")throw new IllegalArgumentException(e+"empty");s=this.getProperty(k);if(p&&p.setProperty)p.setProperty(k,v);return s}
	this.out={
		print:function(s){var w=window;if(w.console&&console.log)console.log(s);else if(w.opera&&opera.postError)opera.postError(s)},
		println:function(s){this.print(s)}
	};

	var system=this;
	var p,path="";
	
	function getOs(){
		var n,v,r,nt,mw,mac,w,mo,ms,ua,os={name:"Unknown",version:0,vendor:"Unknown",arch:""};
		ua=navigator.userAgent.toLowerCase();
		mw="Windows ";mo="Mac OS ";w="windows ";mac="mac";ms="Microsoft";nt="winnt ";
		
		
		os.arch=navigator.platform.toLowerCase();
		if(("win32"==os.arch)||(os.arch.match(/i.86/)))os.arch="x86";
		else if(os.arch.indexOf('x64')+1||os.arch.indexOf('x86_64')+1)os.arch="x86_64";
		else if(os.arch.indexOf('ppc')+1)os.arch="ppc";
		
		if((ua.indexOf(w+"3.1")+1)||(ua.indexOf("win16")+1)||(ua.indexOf("16bit")+1)||(ua.indexOf("16-bit")+1)){n=ms+"3.1";v="3.1";r=ms}
		else if((ua.indexOf(w+"95")+1)||(ua.indexOf("win95")+1)){n=mw+"95";v="95";r=ms}
		else if(ua.indexOf("win 9x 4.90")+1){n=mw+"ME";v="ME";r=ms}
		else if((ua.indexOf(w+"98")+1)||(ua.indexOf("win98")+1)){n=mw+"98";v="98";r=ms}
		else if((ua.indexOf(w+"nt 5.0")+1)||(ua.indexOf(nt+"5.0")+1)){n=mw+"2000";v="5.0";r=ms}
		else if((ua.indexOf(w+"nt 5.1")+1)||(ua.indexOf(nt+"5.1")+1)){n=mw+"XP";v="5.1";r=ms}
		else if((ua.indexOf(w+"nt 5.2")+1)||(ua.indexOf(nt+"5.2")+1)){n=mw+"Server 2003";v="5.2";r=ms}
		else if((ua.indexOf(w+"nt 6.0")+1)||(ua.indexOf(nt+"6.0")+1)){n=mw+"Vista";v="6.0";r=ms}
		else if((ua.indexOf(w+"nt 6.1")+1)||(ua.indexOf(nt+"6.1")+1)){n=mw+"7";v="6.1";r=ms}
		else if((ua.indexOf(w+"nt")+1)||(ua.indexOf(nt)+1)){n=mw+"NT";v="4.0";r=ms}
		else if((ua.indexOf(mac)+1)&&((ua.indexOf("68K")+1)||(ua.indexOf("68000")+1))){n=mo+"680x0";v="680x0";r="Apple"}
		else if((ua.indexOf(mac)+1)&&((ua.indexOf("ppc")+1)||(ua.indexOf("powerpc")+1))){n=mo+"PowerPC";v="ppc";r="Apple"}
		else if(ua.indexOf("gentoo")+1){n="Gentoo";v="0";r="nix"}
		else if(ua.indexOf("ubuntu")+1){n="Ubuntu";v="0";r="nix"}
		else if(ua.indexOf("debian")+1){n="Debian";v="0";r="nix"}
		else if(ua.indexOf("rhel")+1||ua.indexOf("red hat")+1){n="RHEL";v="0";r="nix"}
		else if(ua.indexOf("centos")+1){n="CentOS";v="0";r="nix"}
		else if(os.arch=="sunos"){n="Sun Solaris";v="0",r="nix"}
		else if(os.arch=="series60"){n="Symbian OS";v="0",r="Symbian"}
		else if(ua.indexOf("linux")+1){n="Linux";v="0";r="nix"}
		if(n)os.name=/*navigator.oscpu||*/n;
		if(v)os.version=v;
		if(r)os.vendor=r;
		

		return os
	}
	
	function getBrowser(){
		var v,s,b,d,w,n=navigator;w=window;d=document;s=screen;
		b={name:n.appName.replace(/\W/g," "),version:parseInt(n.appVersion),vendor:n.vendor};
		function V(s,S){var m=n.userAgent.match(new RegExp(" "+s+"\\/([\\d]+)"));return(m&&m[1])||S}
		if(v=(!+"\v1")&&(typeof w.external.AddService!="undefined"?8:('maxHeight' in d.documentElement.style)?7:d.compatMode?6:w.createPopup?5.5:w.attachEvent?5:d.all?4:3)){
			b.name="Microsoft Internet Explorer";
			b.version=v;
			if(!b.vendor)b.vendor="Microsoft"
		}else if(v=(w.opera&&opera.defineMagicFunction&&opera.postError&&opera.version&&opera.version())){
			b.name="Opera";
			b.version=parseInt(v);
			if(!b.vendor)b.vendor="Opera";
			if((s=w.screen)&&((s.width==480&&s.height==320)||(s.width==320&&s.height==480)))
				b.name+=" Mobile"
		}else if(d.documentElement&&('WebkitAppearance' in d.documentElement.style)){
			if(/a/.__proto__=='//'&&w.EvalError){
				b.name="Safari";
				if(!b.vendor)b.vendor="Apple";
				b.version=V("Version",d.compatMode?3.1:w.devicePixelRatio?3:2);
				if(w.orientation)b.name+=" Mobile"
			}else if(/s/.test(/a/.toString)&&w.SVGColor){
				b.name="Google Chrome";
				if(!b.vendor)b.vendor="Google";
				b.version=V("Chrome",1);
			}else b.name="Webkit"
		}else if(v=String.trimRight?3.5:(function x(){})[-5]=='x'?3:(function x(){})[-6]=='x'?2:/x/[-1]=='x'?1:0){
			if(v<2&&/Firefox[\/\s](\d+\.\d+)/.test(n.userAgent))v=new Number(RegExp.$1);
			b.name="Mozilla Firefox";
			b.version=v;
			if(!b.vendor)b.vendor="Mozilla"
		}
		return b;
	}
	
	(function(){
		for(var i in java.lang)if(!window[i])window[i]=java.lang[i];
		window.System=system;
		var s,i="java.lang.script";
		document.write("<scr"+"ipt id='"+i+"'></scr"+"ipt>");
		if(s=document.getElementById(i)){
			i=s.previousSibling;s.parentNode.removeChild(s);
			if(i&&i.tagName=="SCRIPT"){
				s=i.src.split("/");
				for(i=0;i<s.length-1;path+=s[i++]+"/");
			}
		}
	})();
})();